/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package DTO;

import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import org.xml.sax.SAXException;

/**
 *
 * @author DatPLT
 */
public class TaskAddSAXProcessor implements Serializable{

    public TaskAddSAXProcessor() {
    }
    public void save (String fileName) throws IOException{
        try{
            TaskAddSAXParser obj = new TaskAddSAXParser();
            SAXParserFactory spf = SAXParserFactory.newInstance();
            SAXParser parser = spf.newSAXParser();
            File file = new File(fileName);
            parser.parse(file, obj);
        }catch(ParserConfigurationException ex){
            ex.printStackTrace();
        }catch(SAXException ex){
            ex.printStackTrace();
        }
    }
}
